﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListTeam.ascx.cs" Inherits="Pantry.Web.Users.Controls.ListTeam" %>
<%@ Register TagPrefix="CC1" Namespace="SiteUtils" Assembly="CollectionPager" %>
<asp:UpdatePanel ID="UpdatePanelContact" runat="server">
<Triggers>
    <asp:AsyncPostBackTrigger ControlID="CollectionPager" EventName="Click" />
</Triggers>
<ContentTemplate>
    <link rel="stylesheet" href="../Resources/css/lachv.css" />
    <div class="g_12">
	    <div class="widget_header ">
	        <div class="listBottomTop" style="float: left">
		        <div class="buttonTop">
		            <asp:Button ID="Button6" runat="server" CssClass="simple_buttons" OnClick="ButtonFilterW" Text="W X Y Z"/>
		        </div>
		        <div class="buttonTop">
		            <asp:Button ID="Button5" runat="server" CssClass="simple_buttons" OnClick="ButtonFilterS" Text="S T U V"/>
		        </div>
		        <div class="buttonTop">
		            <asp:Button ID="Button4" runat="server" CssClass="simple_buttons" OnClick="ButtonFilterO" Text="0 P Q R"/>
		        </div>
		        <div class="buttonTop">
		            <asp:Button ID="Button3" runat="server" CssClass="simple_buttons" OnClick="ButtonFilterK" Text="K L M N"/>
		        </div>
		        <div class="buttonTop">
		            <asp:Button ID="Button2" runat="server" CssClass="simple_buttons" OnClick="ButtonFilterF" Text="F G H I J"/>
		        </div>
		        <div class="buttonTop">
		            <asp:Button ID="Button1" runat="server" CssClass="simple_buttons" OnClick="ButtonFilterA" Text="A B C D E"/>
		        </div>
		        <div class="buttonTop">
		            <asp:Button runat="server" CssClass="simple_buttons" OnClick="ButtonFilter09" Text="0-9"/>
		        </div>
		        <div class="buttonTop">
		            <asp:Button ID="Button7" runat="server" CssClass="simple_buttons" OnClick="ButtonFilterAllClicked" Text="ALL"/>
		        </div>
	        </div>
		    <div class="listBottomTop">
    		    
		        <div class="buttonTop checkboxListProgram">
                    <span style="float: left; margin-top: 3px">
                        <asp:CheckBox ID="CheckBoxIncludeActivate" runat="server" CssClass="simple_form magintop10" AutoPostBack="True" Checked="true" />
                    </span>
                    <label class="simple_form" for="CheckBoxIncludeActivate">in-active</label>
		        </div>
		        <div class="buttonTop">
		            <asp:Button runat="server" CssClass="simple_buttons" OnClick="ButtonCreateClicked" Text="Create"/>
		        </div>
        
			    <div class="clear"></div>
		    </div>
	    </div>
    	
	    <div class="clear"></div>
	    <div class="widget_contents noPadding">
		    <table class="tables">
			    <thead>
				    <tr>
					    <th class="sorting">
					        <asp:LinkButton ID="TeamName" runat="server" OnClick="LinkButtonSortingClicked" >Team Name</asp:LinkButton>
					    </th>
					    <th class="sorting">
					        <asp:LinkButton ID="AddressLine1" runat="server" OnClick="LinkButtonSortingClicked" >Address Line 1</asp:LinkButton>
					    </th>
					    <th class="sorting">
					        <asp:LinkButton ID="Postcode" runat="server" OnClick="LinkButtonSortingClicked">Postcode</asp:LinkButton>
					    </th>
					    <th class="sorting">
					        <asp:LinkButton ID="SurName" runat="server" OnClick="LinkButtonSortingClicked" >Contact</asp:LinkButton>
					    </th>
					    <th class="sorting">
					        <asp:LinkButton ID="IsActive" runat="server" OnClick="LinkButtonSortingClicked" Text="Is Active?"/>
					    </th>
				    </tr>
			    </thead>
			    <tbody>
			        <asp:Repeater runat="server" ID="RepeaterTeams">
			        <ItemTemplate>
				        <tr>
					        <td>
					            <a onclick="return confirmDialogue('<%# Eval("IsActive")%>'.toLowerCase());" href="TeamDetail.aspx?DepartmentId=<%# Eval("DepartmentId") %>&Id=<%# Eval("TeamId") %>"><%# Eval("TeamName")%></a>
					            <asp:HiddenField runat="server" ID="HiddenFieldDepartmentId"/>
					        </td>
					        <td><%# Eval("AddressLine1")%></td>
					        <td><%# Eval("Postcode")%></td>
					        <td><%# Eval("SurName")%> <%# Eval("FirstName")%></td>
					        <td><%# Eval("IsActive")%></td>
				        </tr>
				    </ItemTemplate>
				    </asp:Repeater>
			    </tbody>
		    </table>
	    </div>
	    <div class="dtPagination">
            <CC1:CollectionPager ID="CollectionPager" runat="server" BackText="Back" FirstText="First"
                ShowLabel="True" ShowFirstLast="False" NextText="Next" ResultsLocation="None"
                PageNumbersSeparator=" " HideOnSinglePage="False" PagingMode="PostBack">
            </CC1:CollectionPager>
        </div>
    	
    </div>
	<script type="text/javascript">
	    function confirmDialogue(aaa){
	    	if (aaa=='yes') {
	    		return true;
	    	}
	        if(confirm('Do you want to make this Team active?'))
	        return true;
	        return false;
	    }
	    	
	</script>
</ContentTemplate>	
	
</asp:UpdatePanel>